package com.limanyik.family.common.feign;

import com.limanyik.family.common.entity.server.base.dto.MobilePhoneMessageDto;
import com.limanyik.family.common.entity.server.base.vo.MobilePhoneMessageVo;
import com.limanyik.family.common.feign.hystrix.MessageHystrix;
import com.limanyik.family.common.utils.FamilyHttpRequest;
import com.limanyik.family.common.utils.FamilyHttpResponse;
import org.springframework.stereotype.Component;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Component
@FeignClient(value = "family-oss-dev", fallback = MessageHystrix.class)
public interface MessageServiceApi {

    @RequestMapping(value = "/oss/message/sendMessage", method = RequestMethod.POST)
    FamilyHttpResponse<MobilePhoneMessageDto> sendMessage(@RequestBody FamilyHttpRequest<MobilePhoneMessageVo> requestVo);

}
